-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add in some more messages to PMStatisticalSample #200
Add in some more messages to PMStatisticalSample #200
Conversation
Also add in a test to make sure that passing in a negative number causes an error.
* Add in guard clause to prevent use with negative numbers as the behaviour is not well defined. * Prevent a potential float under/overflow by summing the logarithms as suggested by Nicolas Cellier.
…ion. Adds in average, mean, median, stdev, variance messages
… stat-functions
@@ -49,6 +49,20 @@ PMStatisticalSample class >> harmonicMean: aCollection [ | |||
^ (self newFrom: aCollection) harmonicMean | |||
] | |||
|
|||
{ #category : #information } | |||
PMStatisticalSample class >> mean: aCollection [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe aCollection
could be aSample
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I changed from aCollection to aSample
] | ||
|
||
{ #category : #information } | ||
PMStatisticalSample class >> median: aCollection [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above - aCollection
-> aSample
Hello,
I have fleshed out the
PMStatisticalSample
object created in #186. This pull request adds in average, mean, median, stdev, variance messages to try to address #187Best,
Connor